package com.git_taoxian.test3;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class Test {
    public static void main(String[] args) {
        try (//        定义一个缓冲字符输出流对象
             BufferedWriter bw = new BufferedWriter(new FileWriter("d:/WorkDate/linshidata/tx.txt"));){
            bw.write("登鹳雀楼");
            bw.newLine();
            bw.write("王之涣");
            bw.newLine();
            bw.write("白日依山尽，");
            bw.newLine();
            bw.write("黄河入海流。");
            bw.newLine();
            bw.write("欲穷千里目，");
            bw.newLine();
            bw.write("更上一层楼。");
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
        }
    }
}
